package com.xywl.escort.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xywl.escort.R;
import com.xywl.escort.widget.GlideApp;

import java.util.List;

public class HomeAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public HomeAdapter(int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        ImageView imageView = helper.getView(R.id.img_project);
        GlideApp
                .with(mContext)
                .load(item)
                .centerCrop()
                .placeholder(R.mipmap.icon_default_picture)
                .into(imageView);
    }
}
